<h3><?php __e('Listing comments for "%s"', $node->getLabel());?></h3>
<?php if ($comment_objects->size() > 0):?>
<div class="nodesSort">
<?php _e('Sort by ');select_to_remote('sortby', $comment_sortby, 'xigg-admin-node-comment-list', array('created,DESC' => _('Newest first'), 'created,ASC' => _('Oldest first')), array('base' => '/node/' . $node_id . '/comment', 'params' => array()), _('Go'), 'xigg-admin-node-comment-list-select');?>
</div>
<?php form_tag('post', Sabai_URL::get('/node/' . $node_id . '/comment/submit'), array('id' => 'xigg-admin-node-comment-list-form'));?>
  <table>
    <thead>
      <tr>
        <th class="left"><input id="xigg-admin-node-comment-list-form-checkall" type="checkbox" onclick="$$('#xigg-admin-node-comment-list-form input.check').each(function(ele){ele.checked=$('xigg-admin-node-comment-list-form-checkall').checked});" /></th>
        <th class="left"><?php _e('Title');?></th>
        <th class="left"><?php _e('Poster');?></th>
        <th><?php _e('Posted');?></th>
        <th><?php _e('Updated');?></th>
        <th class="left"><?php _e('Article');?></th>
        <th scope="col"><?php _e('Action');?></th>
      </tr>
    </thead>
    <tfoot>
      <tr>
        <td colspan="4" class="left">
          <input type="submit" name="delete" value="<?php _e('Delete');?>" />
        </td>
        <td colspan="3" class="right"><?php echo $this->helper('PageNavRemote', 'xigg-admin-node-comment-list', $comment_pages, $comment_page_requested, array('base' => '/node/' . $node_id . '/comment/list', 'params' => array('sortby' => $comment_sortby)));?></td>
      </tr>
    </tfoot>
    <tbody>
<?php   while ($e =& $comment_objects->getNext()):?>
      <tr>
        <td class="left"><input type="checkbox" class="check" name="comments[]" value="<?php echo $e->getId();?>" /></td>
        <td class="left"><a href="<?php echo Sabai_URL::getByScript('index.php', '/node/' . $node_id, array('comment_id' => $e->getId()));?>"><?php _h(Sabai_I18N::strcutMore($e->getLabel(), 100));?></a></td>
        <td class="left"><?php $comment_user =& $e->get('User'); $comment_user->printHTMLLink();?></td>
        <td><?php _h($this->helper('XiggAgo', $e->getTimeCreated()));?></td>
        <td><?php if($updated = $e->getTimeUpdated()){_h($this->helper('XiggAgo', $updated));}?></td>
        <td class="left"><?php _h($node->getLabel());?></td>
        <td><?php link_to_remote(_('Edit'), 'xigg-admin-node-comment-list-update', array('base' => '/node/' . $node_id . '/comment/' . $e->getId() . '/edit'));?></td>
      </tr>
<?php   endwhile; ?>
    </tbody>
  </table>
<input type="hidden" name="_TOKEN" value="<?php echo $this->helper('Token', 'Admin_node_comment_submit');?>" />
<?php form_tag_end();?>

<div id="xigg-admin-node-comment-list-update"></div>
<?php else:?>
<?php _e('No comments found for this entry');?>
<?php endif;?>